x11: Don't update GLX visuals with EGL
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 10 May 2021 20:19:14 +0000 (21:19 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 10 May 2021 20:19:14 +0000 (21:19 +0100)
We're going to get into a messy situation, with both GLX and EGL
initialized.

If we're already using EGL, skip the whole cache.

gdk/x11/gdkglcontext-glx.c

index d9f9cf51d403c50aeb20bf6fa0068766f7688712..4181168262aa997ed46209dd4ad1ef26de240134 100644 (file)
@@ -1022,6 +1022,9 @@ gdk_x11_screen_update_visuals_for_glx (GdkX11Screen *x11_screen)
   display_x11 = GDK_X11_DISPLAY (display);
   dpy = gdk_x11_display_get_xdisplay (display);
 
+  if (display_x11->have_egl)
+    return;
+
   /* We save the default visuals as a property on the root window to avoid
      having to initialize GL each time, as it may not be used later. */
   if (get_cached_gl_visuals (display, &system_visual_id, &rgba_visual_id))